1. Field of the Invention
The present invention relates to multicasting on a data communications network. More specifically, the present invention relates to eliminating the problem of multicast echo, where duplicates of a multicast packet are delivered to the same address.
2. The Background
Multicasting is the process by which a host or other device transmits a message or packet to a selected group of recipients. It is commonly used in broadcast networks like Ethernet networks but may be used in any type of network. FIG. 1 is a diagram illustrating a network capable of utilizing multicasting. Host 10 is coupled via an Ethernet link to a gateway 12. Additional hosts 14, 16, 18 may also be coupled to the gateway 12 via Ethernet links. Host 10 may be a member of a multicast group which also includes hosts 14, 16, and 18. Thus, if host 10 transmits a packet to gateway 12, gateway 12 will send a duplicate of the packet to the other members of the group, which include hosts 14, 16, and 18.
There is a potential, however, in certain instances, for a multicasting echo problem to arise. A multicast echo occurs when two or more versions of the same packet arrive at the same destination or host. FIG. 2 illustrates an example of how this might occur. Host 50 and host 52 are both coupled to a network access server (NAS) 56, which may be located between the hosts 50, 52 and a host gateway 54. Host gateway 54 may also be coupled to hosts 58, 60, 62. The problem arises if both host 50 and host 52 are members of the same multicast group. Host 50 may transmit a packet intended for each member of the multicast group. Since host 52 is on the same Ethernet segment as host 50, the packet will be received by host 52 directly from host 50. However, host gateway 54 will also send a duplicate of the packet to each member of the multicast group, which includes host 52. Thus, host 52 will receive two versions of the same packet. This consumes valuable bandwidth and CPU cycles of both the gateways and the hosts.
This problem is amplified if the host gateway performs any type of routine modification on the packets, such as network address translation (NAT). NAT is a process by which a gateway modifies either the source address or destination address of a packet in order to compensate for the fact that there is a different addressing scheme on the other side of the gateway. Thus, if NAT is used in the multicast situation discussed above, it is possible for host 52 to receive two packets, identical in every way except for the fact that they have different source addresses. This has the potential to confuse or break multicast applications and confuse the end users. Thus, it is necessary to arrive at a solution which removes this potential multicast echo problem.
An apparatus is provided which processes upstream multicast packets and downstream multicast packets in a manner such as to avoid the problem of multicast echo which is generated from a host gateway. For upstream multicast packets, a method is provided which includes: extracting the source network address from the upstream multicast packet; storing said source network address in a table corresponding to the destination host gateway of the packet; and forwarding the upstream multicast packet to the destination network address. For downstream multicast packets, a method is provided which includes: accessing a table corresponding to the host gateway from which the packet was sent; determining if said source network address of the multicast packet is identical to an entry in said table; discarding the multicast packet if said source network address is identical to an entry in said table; and forwarding the multicast packet to said destination network address if said source network address is not identical to an entry in said table. This eliminates any downstream multicast packets which originated from one of the hosts coupled to the apparatus, and thus prevents multicast echo problems from occurring.